package com.sunjy.common.utils.word;


import java.util.Map;
import freemarker.template.Configuration;

/**
 * Created by zhouyao on 2017/11/23.
 */
public class WordBean {
    private Configuration configuration;
    private String templateName;
    private Map<String,Object> dataMap;

    //  templatePath:/wordTem/     templateName:authLetter.ftl
    public WordBean(String templatePath, String templateName, Map<String,Object> dataMap){
        this.configuration = new Configuration();
        this.templateName = templateName;
        this.dataMap = dataMap;
        this.configuration.setDefaultEncoding("utf-8");
        this.configuration.setClassForTemplateLoading(this.getClass(),templatePath);
    }

    public Configuration getConfiguration() {
        return configuration;
    }

    public void setConfiguration(Configuration configuration) {
        this.configuration = configuration;
    }

    public String getTemplateName() {
        return templateName;
    }

    public void setTemplateName(String templateName) {
        this.templateName = templateName;
    }

    public Map<String, Object> getDataMap() {
        return dataMap;
    }

    public void setDataMap(Map<String, Object> dataMap) {
        this.dataMap = dataMap;
    }
}
